/*
 * @Author: Li Zengkun
 * @Date: 2022-09-26 19:13:56
 * @LastEditors: Li Zengkun
 * @LastEditTime: 2022-09-26 19:19:06
 * @Description: 
 */
import axios from "axios"

// 修改收货地址
const edit = (id, data) => axios.put(`/address/${id}`, data)

// 删除收货地址
const remove = (id, params) => axios.delete(`/address/${id}`, { params })

// 根据id获取收货地址详情
const getById = (params) => axios.get('/address', { params })

// 添加收货地址
const add = (data) => axios.post('address'.data)

// 获取收货地址列表
const getList = (params) => axios.get('/address/list', { params })

export default {
    edit,
    remove,
    getById,
    add,
    getList
}